package com.first.teacher.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.first.common.pojo.EduTeacher;
import com.first.common.pojo.TbShoucangTeacher;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ShouCangTeacherMapper extends BaseMapper<TbShoucangTeacher> {

    @Select("select * from edu_teacher where mobile=#{mobile}")
    EduTeacher findTeacherByMobile(String mobile);

    //我的关注
    @Select("SELECT et.* FROM edu_teacher et JOIN tb_shoucang_teacher tst ON tst.teacher_id=et.id \n" +
            "WHERE tst.member_id=#{id}")
    List<EduTeacher> findAttentionTeacher(String id);
}
